// 根据reducers创建管理数据的仓储对象store
import {createStore,applyMiddleware} from 'redux';
// 导入reducers
import reducers from './reducers';
// 导入redux-devtools-extension
import {composeWithDevTools} from 'redux-devtools-extension';
// 导入saga异步方法
import rootSaga from './saga';
// 导入saga
import createSagaMiddleware from 'redux-saga'; 
// 创建一个saga中间件实例
const sagaMiddleware=createSagaMiddleware();
const store=createStore(reducers,composeWithDevTools(applyMiddleware(sagaMiddleware)));
// 运行saga中间件实例
sagaMiddleware.run(rootSaga);
export default store;